 <!DOCTYPE html>
<html>
<head>
<base href="${basePath}">
<meta charset="UTF-8">
<title>会员活动</title> $!{include("import_js_css.html")}
<!--#set(PaginatedList<LiftClub> memberClub)-->
<!--
						
		#set(
		pager = memberClub.pager,
		totalResults = pager.getCountOfTotalResults(),
		totalPages = pager.getCountOfTotalPages() * 1,
		pageSize = pager.pageSize,
		pageNo = pager.pageNo,
		prePageNo = pager.getPrevPageNo(),
		nextPageNo = pager.getNextPageNo()
		)
-->
</head>
<body>
	$!{include("header.html")}
	<div class="container" style="width: 1200px;">
		<div class="panel panel-info">
			<!--#set(Member member)-->
			<form name="memberClubForm" action="yueyogaAdmin/toMemberLiftClub.jhtml">
				<input type="hidden" name="id" value="${member.memberid}"> <input type="hidden" name="pageNo" id="hidPageNo" />
			</form>
			$!{include("memberHeader.html")} <input id="txtMemberId" type="hidden" value="${member.memberid}" />
			<div id="div_result_member" style="padding: 15px;">
				<div class="panel">
					$!{include("member_info_tab.html")}
					<div id="div_result_member" class="panel-hxcd-info">
						<div class="col-sm-3" style="margin-left:-15px;">
							<select id="MemberLifrClub" data-live-search="true" class="selectpicker show-tick"  data-width="100%" name="MemberLiftClubName">
								<option value=""> </option>
								<!-- #for(LiftClub lift : liftClubAll) -->
								<!--#if(lift.status != 2)  -->
								<option value="${lift.id}">${lift.name}</option>
								<!--#else  -->
								<!-- #end -->
								<!-- #end -->
							</select>
						</div>
						<div class="col-sm-3">
							<button type="button" class="btn btn-default btn-ade-default" style="float: left;" onclick="joinLiftClub()">参加活动</button>
						</div>
						<br><br><br>
						<div id="div_result_member" class="clear">
							<!--#if(totalResults== null || totalResults==0)-->
							<div class="panel-body">
								<p>没有符合条件的数据</p>
							</div>
							<!--#else-->
							<table class="table table-bordered table-hover table-condensed tb" style="text-align: center;">
								<tr>
									<!-- <td >活动编号</td> -->
									<td class="tb-time">主题</td>
									<td class="tb-teacher">状态</td>
									<td class="tb-teacher">老师</td>
									<td class="tb-teacher">负责人</td>
									<td>场地</td>
									<td class="tb-time">开始时间</td>
									<td class="tb-time">结束时间</td>
								</tr>
								<!--#for(LiftClub liftClub:memberClub)-->
								<tr>
									<!-- <td>${liftClub.id}</td> -->
									<td><a href="yueyogaAdmin/toLiftClubDetail.jhtml?id=${liftClub.id}">${liftClub.name}</a></td>
									<td style="text-align: center; vertical-align: middle;">
										<!-- #if(liftClub.status == 0) --> 准备中 <!-- #else(liftClub.status == 1) --> 进行中 <!-- #else(liftClub.status == 2) --> 活动结束 <!-- #else(liftClub.status == 3) --> 活动取消 <!-- #end -->
									</td>
									<td>${liftClub.co0name}</td>
									<td>${liftClub.yudname==null?liftClub.username:liftClub.yudname}</td>
									<td>${liftClub.placename}</td>
									<td>${liftClub.startdate.substring(0,16)}</td>
									<td>${liftClub.enddate.substring(0,16)}</td>
								<tr>
									<!--#end-->
							</table>
							<div class="gzce-pagering">$!{include("paging_page.html")}</div>
							<!--#end-->
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
	$(function() {
		var msg = "${msg}";
		if (msg != null && msg != "") {
			alert(msg);
		}
	});

	function documentReady() {
		var msg = "${memlifmsg}";
		var memberId = "${memberId}";
		if (msg == "join") {
			var d = alert("此活动已在任务列表!");
			setTimeout(
					function() {
						d.close().remove();
						window.location.href = "yueyogaAdmin/toMemberLiftClub.jhtml?id="
								+ memberId;
					}, 1000);
		} else if (msg == "success") {
			window.location.href = "yueyogaAdmin/toMemberLiftClub.jhtml?id="
				+ memberId;
		} else if (msg == "failure") {
			error("添加活动失败");
		}
	}
	function searchsubArea(level) {
		var sonArea;
		var parentId = 0;
		if (level == 1) {
			parentId = $("#inputProvince").val();
			sonArea = $("#inputCity");
		} else if (level == 2) {
			parentId = $("#inputCity").val();
			sonArea = $("#inputArea");
		} else {
			parentId = $("#inputArea").val();
			sonArea = $("#inputDomain");
		}
		if (parentId != 0) {
			var url = "/yueyoga_all2014/yueyogaAdmin/subArea.jhtml?level="
					+ level + "&parentId=" + parentId;
			$.post(url, function(response) {
				if (response.success) {
					sonArea.html(response.val);
				}
			}, "json");
		}
	}
	function searchMarketingChannel() {
		var marketingChannel = $("#inputMarketingChannel").val();
		if (marketingChannel != null && marketingChannel != "") {
			var url = "/yueyoga_all2014/yueyogaAdmin/substatus.jhtml?code="
					+ marketingChannel;
			$.post(url, function(response) {
				if (response.success) {
					$("#inputSubMarketingChannel").html(response.val);
				}
			}, "json");
		}
	}
	function joinLiftClub() {
		var lcId = $("#MemberLifrClub").val();
		var memberId = $("#txtMemberId").val();
		if (lcId) {
			window.location.href = "yueyogaAdmin/tojoinLiftClub.jhtml?clubId="
					+ lcId + "&memberId=" + memberId;
		} else {
			alert("请选择一项活动");
		}
	}
	function changePage(value) {
		value = value * 1;
		var totalPages = '${totalPages}';
		if (value > totalPages) {
			value = totalPages;
		} else if (value < 1) {
			value = 1;
		}
		$("#txtPageNumber").val(value);
		goToPage(value);
	}

	function goToPage(pageNo) {
		$("#hidPageNo").val(pageNo);
		document.memberClubForm.submit();
	}
</script>